При работе с большими объёмами данных Python может «тормозить», особенно при обработке сотен тысяч строк или обучении сложных ML-моделей.
🎯 Ниже — два приёма, которые позволят ускорить обучение и загрузку данных в десятки раз.
1️⃣ Используйте GPU с включённым memory growth
По умолчанию TensorFlow может попытаться занять всю память видеокарты, что приводит к ошибке OOM. Решение — включить «постепенное» выделение памяти:
gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: for gpu in gpus: tf.config.experimental.set_memory_growth(gpu, True)
2️⃣ Оптимизируйте загрузку данных с `tf.data`
Загрузка Excel-файла — типичное узкое место (Disk I/O). Использование tf.data.Dataset с prefetch позволяет загружать и обрабатывать данные асинхронно.
Пример:
dataset = tf.data.Dataset.from_generator( data_generator, output_signature={col: tf.TensorSpec(shape=(), dtype=tf.float32) for col in data.columns} ).shuffle(1000).batch(32).prefetch(tf.data.AUTOTUNE)
📎Вывод: GPU и tf.data с правильной настройкой дают мощный прирост производительности. Особенно важно при работе с крупными ML-пайплайнами и в продакшене.
При работе с большими объёмами данных Python может «тормозить», особенно при обработке сотен тысяч строк или обучении сложных ML-моделей.
🎯 Ниже — два приёма, которые позволят ускорить обучение и загрузку данных в десятки раз.
1️⃣ Используйте GPU с включённым memory growth
По умолчанию TensorFlow может попытаться занять всю память видеокарты, что приводит к ошибке OOM. Решение — включить «постепенное» выделение памяти:
gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: for gpu in gpus: tf.config.experimental.set_memory_growth(gpu, True)
2️⃣ Оптимизируйте загрузку данных с `tf.data`
Загрузка Excel-файла — типичное узкое место (Disk I/O). Использование tf.data.Dataset с prefetch позволяет загружать и обрабатывать данные асинхронно.
Пример:
dataset = tf.data.Dataset.from_generator( data_generator, output_signature={col: tf.TensorSpec(shape=(), dtype=tf.float32) for col in data.columns} ).shuffle(1000).batch(32).prefetch(tf.data.AUTOTUNE)
📎Вывод: GPU и tf.data с правильной настройкой дают мощный прирост производительности. Особенно важно при работе с крупными ML-пайплайнами и в продакшене.
You guessed it – the internet is your friend. A good place to start looking for Telegram channels is Reddit. This is one of the biggest sites on the internet, with millions of communities, including those from Telegram.Then, you can search one of the many dedicated websites for Telegram channel searching. One of them is telegram-group.com. This website has many categories and a really simple user interface. Another great site is telegram channels.me. It has even more channels than the previous one, and an even better user experience.These are just some of the many available websites. You can look them up online if you’re not satisfied with these two. All of these sites list only public channels. If you want to join a private channel, you’ll have to ask one of its members to invite you.
Tata Power whose core business is to generate, transmit and distribute electricity has made no money to investors in the last one decade. That is a big blunder considering it is one of the largest power generation companies in the country. One of the reasons is the company's huge debt levels which stood at ₹43,559 crore at the end of March 2021 compared to the company’s market capitalisation of ₹44,447 crore.
Библиотека дата сайентиста | Data Science Machine learning анализ данных машинное обучение from jp